{% extends "template/layout.html" %} {% block title %} 测试文件 {% endblock %}
{% block content %}

<input
  type="submit"
  onclick="window.location.href='/user/create';"
  value="添加"
/>

<table>
  <tr>
    <td>名字：</td>
    <td>年龄：</td>
    <td>操作</td>
  </tr>
  {% for user in users %}
  <tr>
    <td>{{ user.name }}</td>
    <td>{{ user.age }}</td>
    <td>
      <a href="/user/{{ user.id }}/edit">编辑</a>
      <a
        href="javascript:void(0);"
        request-url="/user/{{ user.id }}"
        class="delete"
        >删除</a
      >
    </td>
  </tr>
  {% endfor %}
</table>
{% endblock %}